#define _CRT_SECURE_NO_WARNINGS
#include <stdio.h>
#include <string.h>

typedef struct BigInteger {
	int digit[1000];
	int size;
}INT;

void set(INT * in,char str[])
{
	memset(in,0,sizeof(INT));
	int len = strlen(str);
	for (int i = len - 1, j = 0, t = 0, c = 1; i >= 0; i--)
	{
		t += (str[i] - '0') * c;
		j++;
		c *= 10;
		if (j == 4 || i == 0)
		{
			in->digit[(in->size)++] = t;
			j = 0;
			t = 0;
			c = 1;
		}
	}
}
void output(INT in)
{
	for (int i = in.size - 1; i >= 0; i--)
	{
		if (i != in.size - 1) {
			printf("%04d", in.digit[i]);
		}
		else {
			printf("%d", in.digit[i]);
		}
	}
	printf("\n");
}
INT add(INT a, INT b)
{
	INT c;
	memset(&c,0,sizeof(c));
	int carry = 0;
	for (int i = 0; i < a.size || i < b.size; i++)
	{
		int tmp = a.digit[i] + b.digit[i];
		carry = tmp / 10000;
		tmp %= 10000;
		c.digit[c.size++] = tmp;
	}
	if (carry != 0)
	{
		c.digit[c.size++] = carry;
	}
	return c;
}
int main()
{
	char str1[1000], str2[1000];
	INT a, b,c;
	while (scanf("%s%s", str1, str2) != EOF)
	{
		set(&a, str1);
		set(&b, str2);
		c = add(a, b);
		output(c);
	}
	return 0;
}